package io.lckgroup.modules.lck.controller.wxgzh;

import io.lckgroup.common.utils.R;
import io.lckgroup.modules.lck.utils.JSSDK_Util;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 微信jssdk配置接口
 */
@RestController
@RequestMapping("/mp/wxjssdk")
public class WxjssdkController {
    /**
     * 获取jssdk配置参数
     *
     * @param url
     * @return
     */
    @GetMapping("/jssdkconfig")
//    @WxLogin
    public R JSSDK_config(@RequestParam String url) {
        Map<String, String> configMap = JSSDK_Util.jsSDK_Sign(url);
        return R.ok().put("config", configMap);
    }
}
